const {app, BrowserWindow} = require('electron')

console.log('hello world electron!');

// 创建主窗口
const createWin = () => {
    const mainWindow = new BrowserWindow(
        {
            width: 1000,
            height: 500,
            webPreferences: {
                nodeIntegration: true,
                devTools: true
            }
        }
    )
    mainWindow.loadURL('http://localhost:3000')
}

// 当app应用准备好
app.whenReady().then(() => {
    console.log('whenReady!!!');
    createWin()
})